function isNumber(num) {
  return !isNaN(Number(num))
}

/**
 * @return {string}
 */
export default function imgUrlBase(url) {
  const arr = url?.split('/');
  const fileName = arr?.length && arr[arr.length - 1];
  if(fileName && isNumber(fileName.slice(0, fileName.lastIndexOf('.')))) {
    return 'http://cache.51job.com/51job/api/1.0/public/';
  } else if (fileName) {
    return 'http://cache.51job.com/'
  } else {
    return ''
  }
}